<?php
$q=str_ireplace("%40", "@", $_REQUEST["q"]);
$gid=strtok($q,"@");
$pid=strtok("@");
$con=mysql_connect("localhost","root","");
if(!$con)
{
	die("Unable to connect to database");
}
mysql_select_db("se_group2",$con);
$res=mysql_query("SELECT current_size,name FROM `se_group2`.`group`,`student` WHERE PID=".$pid." AND owner_id=UID AND GID=".$gid.";");
$row=mysql_fetch_array($res);
$owner=$row['name'];
$res3=mysql_query("SELECT name FROM `group_student` NATURAL JOIN `student` WHERE GID=".$gid." AND PID=".$pid);
$group="";
while($row3=mysql_fetch_array($res3))
{
	$group.=$row3['name']."/";
}
$group.=$owner."/";
$group.=$row['current_size'];
echo $group;
mysql_close($con);
?>